<template>
  <div>
    <div>
      使用action请求数据，修改state
    </div>

    <div>用户信息：{{greeting}}</div>
    <button @click="handleClick">改变问候语</button>
  </div>
</template>
<script setup lang="ts">
import {useCounterStore,IUser} from '@/stores/counter'
import {storeToRefs} from 'pinia'
const counterStore = useCounterStore()
const {greeting,changeGreeting} = storeToRefs(counterStore)
console.log('getUserInfoByRegister',greeting,changeGreeting)
function handleClick(){
  changeGreeting()
}
</script>